import Vue from 'vue';
import Router from 'vue-router';

const originalPush = Router.prototype.push
Router.prototype.push = function push(location, onResolve, onReject) {
    if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
    return originalPush.call(this, location).catch(err => err)
}

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/home'
        },
        {
            path: '/home',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: [{ name: '首页' }],
            children: [
                {
                    path: '/home',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/home.vue'),
                    meta: []
                },
                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: [{ name: '404' }]
                },
                {
                    path: '/link',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/link.vue'),
                    meta: [{ name: '详情' }]
                },
                {
                    path: '/linkdetail',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/linkdetail.vue'),
                    meta: [{ name: '详情' }]
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: [{ name: '403' }]
                },
                {
                    path: '/system403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/system403.vue'),
                    meta: [{ name: '403' }]
                },
                {
                    path: '/message',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/message.vue'),
                    meta: [{ name: '消息中心' }]
                },
                // 系统配置
                {
                    path: '/business',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/business/index.vue'),
                    meta: [{ name: '企业信息' }],
                },
                {
                    path: '/staffsManagement',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/staffsManagement/index.vue'),
                    meta: [{ name: '员工管理' }],
                },
                {
                    path: '/staffsManagement/addedstaff',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/staffsManagement/addedstaff.vue'),
                    meta: [{ name: '员工管理' ,url:'/staffsManagement'},
                        {name:'新建员工'}
                    ],
                },
                {
                    path: '/permission',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/permission/index.vue'),
                    meta: [{ name: '权限配置' }],
                },
                {
                    path: '/supplierManagement',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/supplierManagement/index.vue'),
                    meta: [{ name: '供应商' }],
                },
                {
                    path: '/supplierManagement/added',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/supplierManagement/addedsupplierManagement.vue'),
                    meta: [
                        {name:'供应商',url:'/supplierManagement'},
                        { name: '新建供应商' }
                    ],
                },
                {
                    path: '/supplierManagement/check',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/supplierManagement/check.vue'),
                    meta: [
                        {name:'供应商',url:'/supplierManagement'},
                        { name: '查看供应商' }
                    ],
                },
                {
                    path: '/customerManagement',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/customerManagement/index.vue'),
                    meta: [{ name: '客户管理' }],
                },
                {
                    path: '/customerManagement/added',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/customerManagement/added.vue'),
                    meta: [{ name: '客户管理' ,url:'/customerManagement'},
                        {name:'新增客户'}
                    ],
                },
                {
                    path: '/materialsManagement',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/materialsManagement/index.vue'),
                    meta: [{ name: '物料管理' }],
                },
                {
                    path: '/materialsManagement/added',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/materialsManagement/added.vue'),
                    meta: [{ name: '物料管理' ,url:'/materialsManagement'},
                        {name:'新增物料'}
                    ],
                },
				{
				    path: '/materialsManagement/edit',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/materialsManagement/added.vue'),
				    meta: [{ name: '物料管理' ,url:'/materialsManagement'},
				        {name:'编辑物料'}
				    ],
				},
                {
                    path: '/materialsManagement/viewed',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/materialsManagement/viewed.vue'),
                    meta: [{ name: '物料管理' ,url:'/materialsManagement'},
                        {name:'查看物料'}
                    ],
                },
                {
                    path: '/checkingBasis',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/checkingBasis/index.vue'),
                    meta: [{ name: '检测依据' }],

                },
                {
                    path: '/checkingBasis/added',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/checkingBasis/added.vue'),
                    meta: [{ name: '检测依据' ,url:'/checkingBasis'},
                        {name:'新增依据'}
                    ],
                },
				{
				    path: '/checkingBasis/edit',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/checkingBasis/added.vue'),
				    meta: [{ name: '检测依据' ,url:'/checkingBasis'},
				        {name:'编辑检测依据'}
				    ],
				},
                {
                    path: '/process',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/process/index.vue'),
                    meta: [{ name: '工艺工序' }],
                },
                {
                    path: '/process/added',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/process/added.vue'),
                    meta: [
                        { name: '工艺工序',url:'/process'},
                        {name:'添加工艺'}
                    ],
                },
                {
                    path: '/productMessage',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/productMessage/index.vue'),
                    meta: [{ name: '产品信息' }],
                },
                {
                    path: '/productMessage/add',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/productMessage/added.vue'),
                    meta: [{ name: '产品信息' ,url:'/productMessage'},
                        { name: '新建产品' }
                    ],
                },
                {
                    path: '/productMessage/edit',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/productMessage/added.vue'),
                    meta: [{ name: '产品信息' ,url:'/productMessage'},{ name: '编辑产品' }],
                },
                {
                    path: '/gradation',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/gradation/index.vue'),
                    meta: [{ name: '分级标准' }],
                },
                {
                    path: '/basicsSource',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/basicsSource/index.vue'),
                    meta: [{ name: '基源管理' }],
                },
                {
                    path: '/storage',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/storage/index.vue'),
                    meta: [{ name: '仓储养护' }],
                },
                {
                    path: '/unit',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/unit/index.vue'),
                    meta: [{ name: '单位管理' }],
                },
                {
                    path: '/equipment',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/equipment/index.vue'),
                    meta: [{ name: '设备管理' }],
                },
                {
                    path: '/personage',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/personage/personage.vue'),
                    meta: [{ name: '个人设置' }],
                },
                {
                    path: '/supersupro',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/supersupro/supersupro.vue'),
                    meta: [{ name: '权限管理' }],
                },
                {
                    path: '/system',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/system/index.vue'),
                    meta: [{ name: '系统日志' }],
                },
				{
				    path: '/detectionMechanism',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/detectionMechanism/index.vue'),
				    meta: [{ name: '检测机构' }],
				},
				{
				    path: '/detectionMechanism/added',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/detectionMechanism/added.vue'),
				    meta: [{ name: '检测机构' ,url:'/detectionMechanism'},
						{name:'新增'}
					],
				},
				{
				    path: '/detectionMechanism/edit',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/detectionMechanism/added.vue'),
				    meta: [{ name: '检测机构' ,url:'/detectionMechanism'},
						{name:'编辑'}
					],
				},
                {
                    // 中药饮片
				    path: '/printTemplateMedicine',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/printTemplateMedicine/index.vue'),
				    meta: [{ name: '打印模板' }],
				},
				{
				    path: '/printTemplate',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/printTemplate/printTemplate.vue'),
				    meta: [{ name: '打印模板' }],
				},
                {
				    path: '/printTemplatenew',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/printTemplatenew/printTemplate.vue'),
				    meta: [{ name: '打印模板' }],
				},

                 // 备案号管理
                 {
                    path: '/systemmanagerecord',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/record/tablelist.vue'),
                    meta: [{ name: '销售备案号' }],
                },
                {
                    path: '/systemmanagerecord/add',
                    name:"managerecordAdd1",
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/record/added.vue'),
                    meta: [{ name: '销售备案号' ,url:'/systemmanagerecord'},
                        { name:'编辑'}
                    ],
                },
                {
                    path: '/systemmanagerecord/edit',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/record/added.vue'),
                    meta: [{ name: '销售备案号' ,url:'/systemmanagerecord'},
                        {name:'编辑'}
                    ],
                },
                {
                    path: '/systemmanagerecord/check',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/record/added.vue'),
                    meta: [{ name: '销售备案号' ,url:'/systemmanagerecord'},
                        {name:'查看'}
                    ],
                },

				{
				    path: '/systemmanagecome',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/comeintoseason/tablelist.vue'),
				    meta: [{ name: '上市备案号' }],
				},
				{
				    path: '/systemmanagecome/add',
				    name:"managerecordAdd1",
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/comeintoseason/added.vue'),
				    meta: [{ name: '上市备案号' ,url:'/systemmanagecome'},
				        { name:'编辑'}
				    ],
				},
				{
				    path: '/systemmanagecome/edit',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/comeintoseason/added.vue'),
				    meta: [{ name: '上市备案号' ,url:'/systemmanagecome'},
				        {name:'编辑'}
				    ],
				},
				{
				    path: '/systemmanagecome/check',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/systemSetting/comeintoseason/added.vue'),
				    meta: [{ name: '上市备案号' ,url:'/systemmanagecome'},
				        {name:'查看'}
				    ],
				},


                // 生产系统
                {
                    path: '/materialCheck',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/materialCheck/index.vue'),
                    meta: [{ name: '原料入库' }],
                },
                {
                    path: '/materialCheck/addMaterialCheck',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/materialCheck/addMaterialCheck.vue'),
                    meta:[
                        { name: '原料入库' ,url:'/materialCheck'},
                        { name:'添加原料'}
                    ],
                },
                {
                    path: '/materialCheck/editMaterialCheck',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/materialCheck/addMaterialCheck.vue'),
                    meta:[
                        { name: '原料入库' ,url:'/materialCheck'},
                        { name: '编辑原料' }
                    ],
                },
                {
                    path: '/materialCheck/viewMaterialCheck',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/materialCheck/viewMaterialCheck.vue'),
                    meta:[
                        { name: '原料入库' ,url:'/materialCheck'},
                        { name: '查看原料' }
                    ],
                },
                {
                    path: '/inventory',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/inventory/index.vue'),
                    meta: [{ name: '库存管理' }],
                },
                {
                    path: '/inventory/invenToryIndex',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/inventory/invenToryIndex.vue'),
                    meta: [
                        { name: '库存管理', url: '/inventory' },
                        { name: '仓库管理' }
                    ],
                },
                {
                    path: '/inventory/addInventory',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/inventory/addInventory.vue'),
                    meta: [
                        { name: '仓库管理', url: '/inventory' },
                        { name: '新增仓库' }
                    ],
                },
                {
                    path: '/inventory/editInventory',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/inventory/addInventory.vue'),
                    meta: [
                        { name: '仓库管理', url: '/inventory' },
                        { name: '编辑仓库' }
                    ],
                },
                {
                    path: '/inventory/viewInventory',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/inventory/viewInventory.vue'),
                    meta: [
                        { name: '仓库管理', url: '/inventory' },
                        { name: '查看仓库' }
                    ],
                },
                {
                    path: '/production',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/production/index.vue'),
                    meta: [{ name: '生产管理' }],
                },
                {
                    path: '/production/addProduction',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/production/addProduction.vue'),
                    meta:[
                        { name: '生产管理' ,url:'/production'},
                        { name: '新增生产' }
                    ],
                },
                {
                    path: '/production/editProduction',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/production/addProduction.vue'),
                    meta:[
                        { name: '生产管理' ,url:'/production'},
                        { name: '编辑生产' }
                    ],
                },
                {
                    path: '/production/viewProduction',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/production/viewProduction.vue'),
                    meta:[
                        { name: '生产管理' ,url:'/production'},
                        { name: '查看生产' }
                    ],
                },
                {
                    path: '/detection',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/detection/index.vue'),
                    meta: [{ name: '检测管理' }],
                },
                {
                    path: '/detection/addDetection',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/detection/addDetection.vue'),
                    meta:[
                        { name: '检测管理' ,url:'/detection'},
                        { name: '新增检测' }
                    ],
                },
				{
				    path: '/detection/photo',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/detection/photo.vue'),
				    meta:[
				        { name: '检测管理' ,url:'/detection'},
				        { name: '相册' }
				    ],
				},
                {
                    path: '/detection/editDetection',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/detection/addDetection.vue'),
                    meta:[
                        { name: '检测管理' ,url:'/detection'},
                        { name: '编辑检测' }
                    ],
                },
                {
                    path: '/detection/viewDetection',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/detection/viewDetection.vue'),
                    meta:[
                        { name: '检测管理' ,url:'/detection'},
                        { name: '查看检测' }
                    ],
                },
                {
                    path: '/packing',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/packing.vue'),
                    meta: [{ name: '包装指令' }],
                },
                {
                    path: '/packing/addPacking',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/addPacking.vue'),
                    meta:[
                        { name: '包装指令', url:'/packing'},
                        { name: '包装' }
                    ],
                },
                {
                    path: '/packing/addPackingMedicalHerb',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/addPackingMedicalHerb.vue'),
                    meta:[
                        { name: '包装指令', url:'/packing'},
                        { name: '中药饮片包装' }
                    ],
                },
                {
                    path: '/packing/viewPacking',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/viewPacking.vue'),
                    meta:[
                        { name: '包装指令', url:'/packing'},
                        { name: '查看' }
                    ],
                },
                {
                    path: '/subpackage',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/index.vue'),
                    meta: [{ name: '审核管理' }],
                },
                {
                    path: '/subpackage/operate',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/operate.vue'),
                    meta:[
                        { name: '审核管理', url:'/subpackage'},
                        { name: '分包' }
                    ],
                },
                {
                    path: '/subpackage/editOperate',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/editOperate.vue'),
                    meta:[
                        { name: '审核管理', url:'/subpackage'},
                        { name: '编辑' }
                    ],
                },
                {
                    path: '/subpackage/viewOperate',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/viewOperate.vue'),
                    meta:[
                        { name: '审核管理', url:'/subpackage'},
                        { name: '查看' }
                    ],
                },
                {
                    path: '/examine',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/examine.vue'),
                    meta:[{ name: '审核管理' }],
                },
                {
                    path: '/examine/viewExamine',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/viewExamine.vue'),
                    meta:[
                        { name: '审核管理', url:'/examine'},
                        { name: '查看' }
                    ],
                },
                {
                    path: '/printTask',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/printTask.vue'),
                    meta: [{ name: '打印管理' }],
                },
                {
                    path: '/printTask/editPrint',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/editPrint.vue'),
                    meta:[
                        { name: '打印管理', url:'/printTask'},
                        { name: '发送设置' }
                    ],
                },
                {
                    path: '/printTask/medicalHerbPrintTemplate',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/medicalHerbPrintTemplate.vue'),
                    meta:[
                        { name: '打印管理', url:'/printTask'},
                        { name: '发送设置(中药饮片)' }
                    ],
                },
                {
                    path: '/printTask/viewPrint',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/subpackage/viewPrint.vue'),
                    meta:[
                        { name: '打印管理', url:'/printTask'},
                        { name: '查看打印' }
                    ],
                },
                {
                    path: '/epiboly',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/epiboly/epiboly.vue'),
                    meta: [{ name: '外包管理' }],
                },
                {
                    path: '/productStorageList',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/productStorageList/productStorageList.vue'),
                    meta: [{ name: '产成品入库单' }],
                },
                {
                    path: '/productStorageList/check',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/productStorageList/check.vue'),
                    meta: [{ name: '产成品入库单',url:"/productStorageList" },{name:'查看'}],
                },
                {
                    path: '/productStorageList/add',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/productStorageList/add.vue'),
                    meta: [{ name: '产成品入库单',url:"/productStorageList" },{name:'新增'}],
                },
                {
                    path: '/indent',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/indent/index.vue'),
                    meta: [{ name: '数据发送' }],
                },
                {
                    path: '/indent/send',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/indent/send.vue'),
                    meta: [{ name: '数据发送',url:'/indent'},
                        {name:'发送'}
                    ],
                },
				{
				    path: '/supply/check',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/indent/check.vue'),
				    meta: [{ name: '供货管理',url:'/indent'},
				        {name:'查看'}
				    ],
				},
				{
				    path: '/supply',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/indent/supply.vue'),
				    meta: [{ name: '供货管理' }],
				},
                {
                    path: '/recall',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/recall/index.vue'),
                    meta: [{ name: '召回管理' }],
                },
                {
                    path: '/recall/addRecall',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/recall/addRecall.vue'),
                    meta:[
                        { name: '召回管理', url:'/recall'},
                        { name: '新增召回' }
                    ],
                },
                {
                    path: '/recall/viewRecall',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/recall/viewRecall.vue'),
                    meta:[
                        { name: '召回管理', url:'/recall'},
                        { name: '查看召回' }
                    ],
                },
                {
                    path: '/statistics',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/statistics/index.vue'),
                    meta: [{ name: '统计数据' }],
                },
                {
                    path: '/traceBack',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/traceBack/index.vue'),
                    meta: [{ name: '追溯查询' }],
                },
                {
                    path: '/traceBack/viewTrace',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/productionSetting/traceBack/viewTrace.vue'),
                    meta:[
                        { name: '追溯查询', url:'/traceBack'},
                        { name: '查看' }
                    ],
                },





                // 管理
                // 信息与权限管理

                // 企业信息 一级页面  厂区管理
                {
                    path: '/factory',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/factory/index.vue'),
                    meta: [{ name: '厂区管理' }],
                },
                {
                    path: '/factory/companmy',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/factory/company.vue'),
                    meta: [{ name: '厂区管理',url:'/factory' },
                        {name:'企业信息'}
                    ],
                },

                // 数据授权
                {
                    path: '/informationfactory',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/informationfactory/index.vue'),
                    meta: [{ name: '厂区管理' }],
                },
                {
                    path: '/informationfactory/informationfactory',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/informationfactory/informationfactory.vue'),
                    meta: [{ name: '厂区管理',url:'/informationfactory' },
                        {name:'数据授权'}
                    ],
                },

                // 员工管理
                {
                    path: '/managestaff',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managestaff/index.vue'),
                    meta: [{ name: '员工管理' }],
                },

                {
                    path: '/managestaff/add',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managestaff/addstaff.vue'),
                    meta: [{ name: '员工管理',url:'/managestaff' },{ name: '新增' }],
                },
                {
                    path: '/managestaff/edit',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managestaff/addstaff.vue'),
                    meta: [{ name: '员工管理',url:'/managestaff' },{ name: '编辑' }],
                },

                // 权限配置

                {
                    path: '/managepermission',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managepermission/index.vue'),
                    meta: [{ name: '权限管理' }],
                },



                // 第三方管理
                // 供应商管理
                {
                    path: '/managesupplierManagement',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managesupplierManagement/index.vue'),
                    meta: [{ name: '供应商' }],
                },
                {
                    path: '/managesupplierManagement/added',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managesupplierManagement/addedsupplierManagement.vue'),
                    meta: [
                        {name:'供应商',url:'/managesupplierManagement'},
                        { name: '新建供应商' }
                    ],
                },
                {
                    path: '/managesupplierManagement/check',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managesupplierManagement/check.vue'),
                    meta: [
                        {name:'供应商',url:'/managesupplierManagement'},
                        { name: '查看供应商' }
                    ],
                },
                // 客户管理
                {
                    path: '/managecustomerManagement',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managecustomerManagement/index.vue'),
                    meta: [{ name: '客户管理' }],
                },
                {
                    path: '/managecustomerManagement/added',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managecustomerManagement/added.vue'),
                    meta: [{ name: '客户管理' ,url:'/managecustomerManagement'},
                        {name:'新增客户'}
                    ],
                },

                // 备案号管理
                {
                    path: '/managerecord',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/record/index.vue'),
                    meta: [{ name: '销售备案号' }],
                },
                {
                    path: '/managerecord/add',
                    name:"managerecordAdd",
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/record/added.vue'),
                    meta: [{ name: '销售备案号' ,url:'/managerecord'},
                        { name:'编辑'}
                    ],
                },
                {
                    path: '/managerecord/edit',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/record/added.vue'),
                    meta: [{ name: '销售备案号' ,url:'/managerecord'},
                        {name:'编辑'}
                    ],
                },
                {
                    path: '/managerecord/check',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/record/added.vue'),
                    meta: [{ name: '销售备案号' ,url:'/managerecord'},
                        {name:'查看'}
                    ],
                },

                // 系统设置

                // 物料管理
                {
                    path: '/managematerialsManagement',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managematerialsManagement/index.vue'),
                    meta: [{ name: '物料管理' }],
                },
                {
                    path: '/managematerialsManagement/added',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managematerialsManagement/added.vue'),
                    meta: [{ name: '物料管理' ,url:'/managematerialsManagement'},
                        {name:'新增物料'}
                    ],
                },
				{
				    path: '/managematerialsManagement/edit',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managematerialsManagement/added.vue'),
				    meta: [{ name: '物料管理' ,url:'/managematerialsManagement'},
				        {name:'编辑物料'}
				    ],
				},
                {
                    path: '/managematerialsManagement/viewed',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/managematerialsManagement/viewed.vue'),
                    meta: [{ name: '物料管理' ,url:'/managematerialsManagement'},
                        {name:'查看物料'}
                    ],
                },

                // 检测依据

                {
                    path: '/managecheckingBasis',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/checkingBasis/index.vue'),
                    meta: [{ name: '检测依据' }],

                },
                {
                    path: '/managecheckingBasis/added',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/checkingBasis/added.vue'),
                    meta: [{ name: '检测依据' ,url:'/managecheckingBasis'},
                        {name:'新增依据'}
                    ],
                },
				{
				    path: '/managecheckingBasis/edit',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/checkingBasis/added.vue'),
				    meta: [{ name: '检测依据' ,url:'/managecheckingBasis'},
				        {name:'编辑检测依据'}
				    ],
				},

                // 检测机构

                {
				    path: '/managedetectionMechanism',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/detectionMechanism/index.vue'),
				    meta: [{ name: '检测机构' }],
				},
				{
				    path: '/managedetectionMechanism/added',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/detectionMechanism/added.vue'),
				    meta: [{ name: '检测机构' ,url:'/managedetectionMechanism'},
						{name:'新增'}
					],
				},
				{
				    path: '/managedetectionMechanism/edit',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/detectionMechanism/added.vue'),
				    meta: [{ name: '检测机构' ,url:'/managedetectionMechanism'},
						{name:'编辑'}
					],
				},

                // 工艺工序
                {
                    path: '/manageprocess',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/process/index.vue'),
                    meta: [{ name: '工艺工序' }],
                },
                {
                    path: '/manageprocess/added',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/process/added.vue'),
                    meta: [
                        { name: '工艺工序',url:'/manageprocess'},
                        {name:'添加工艺'}
                    ],
                },

                // 产品信息
                {
                    path: '/manageproductMessage',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/productMessage/index.vue'),
                    meta: [{ name: '产品信息' }],
                },
                {
                    path: '/manageproductMessage/add',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/productMessage/added.vue'),
                    meta: [{ name: '产品信息' ,url:'/manageproductMessage'},{ name: '新建产品' }],
                },
                {
                    path: '/manageproductMessage/edit',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/productMessage/added.vue'),
                    meta: [{ name: '产品信息' ,url:'/manageproductMessage'},{ name: '编辑产品' }],
                },
                {
                    path: '/productLicence',
                    component: () => import( '../components/page/manage/productLicence/productLicence.vue'),
                    meta: [{ name: '生产许可证' }],
                },

                // 单位管理
                // {
                //     path: '/manageunit',
                //     component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/unit/index.vue'),
                //     meta: [{ name: '单位管理' }],
                // },

                // 打印模板
                {
				    path: '/manageprintTemplate',
				    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/printTemplate/printTemplate.vue'),
				    meta: [{ name: '打印模板' }],
				},

                // 系统日志
                {
                    path: '/managesystem',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/manage/system/index.vue'),
                    meta: [{ name: '系统日志' }],
                },

            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/NewLogin.vue'),
            meta: [{ name: '登录' }]
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});

// const commonRoutes = [
//     {
//         path: '/login',
//         component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
//         meta: [{ name: '登录' }]
//     },
// ]


// export const asyncRoutes = {

// }

// export const createRouter = () =>{
//     return [...commonRoutes]
// }

// const routes = createRouter()

// export default routes
